import { useCityStore } from '@/common/hox/cityStore'
import styles from './index.module.less'

function AreaSelect(props: React.PropsWithChildren<{
  handleCityClick: () => void
}>) {
  const { handleCityClick } = props
  const { movieLocation } = useCityStore()
  return (
    <div className={styles.areaSelect}>
      <div className={styles.select} onClick={handleCityClick}>
        <span className={styles.text}>{movieLocation?.city}</span>
      </div>
      {/* <div className={styles.select}>
        <span className={styles.text}>areaSelect</span>
      </div> */}
      { props.children }
    </div>
  )
}

export default AreaSelect